<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="prev" href="node704.html" />
<link rel="parent" href="module-Tix.html" />
<link rel="next" href="module-ScrolledText.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>20.2.3 Tix Commands</title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="20.2.2.8 form Geometry Manager"
  href="node712.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="20.2 tix  "
  href="module-Tix.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="20.3 scrolledtext  "
  href="module-ScrolledText.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="node712.html">20.2.2.8 Form Geometry Manager</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-Tix.html">20.2 Tix  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-ScrolledText.html">20.3 ScrolledText  </a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h2><a name="SECTION0022230000000000000000">
20.2.3 Tix Commands</a>
</h2>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-4738' xml:id='l2h-4738' class="class">tixCommand</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
The <a class="ulink" href="http://tix.sourceforge.net/dist/current/man/html/TixCmd/tix.htm"
  >tix commands</a>
provide access to miscellaneous elements of <tt class="module"><a href="module-Tix.html">Tix</a></tt>'s internal
state and the  <tt class="module"><a href="module-Tix.html">Tix</a></tt> application context.  Most of the information
manipulated by these methods pertains to the application as a whole,
or to a screen or display, rather than to a particular window.

<p>
To view the current settings, the common usage is:
<div class="verbatim"><pre>
import Tix
root = Tix.Tk()
print root.tix_configure()
</pre></div>
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4739' xml:id='l2h-4739' class="method">tix_configure</tt></b>(</nobr></td>
  <td><var></var><big>[</big><var>cnf,</var><big>]</big><var> **kw</var>)</td></tr></table></dt>
<dd>
Query or modify the configuration options of the Tix application
context. If no option is specified, returns a dictionary all of the
available options.  If option is specified with no value, then the
method returns a list describing the one named option (this list will
be identical to the corresponding sublist of the value returned if no
option is specified).  If one or more option-value pairs are
specified, then the method modifies the given option(s) to have the
given value(s); in this case the method returns an empty string.
Option may be any of the configuration options.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4740' xml:id='l2h-4740' class="method">tix_cget</tt></b>(</nobr></td>
  <td><var>option</var>)</td></tr></table></dt>
<dd>
Returns the current value of the configuration option given by
<var>option</var>. Option may be any of the configuration options.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4741' xml:id='l2h-4741' class="method">tix_getbitmap</tt></b>(</nobr></td>
  <td><var>name</var>)</td></tr></table></dt>
<dd>
Locates a bitmap file of the name <code>name.xpm</code> or <code>name</code> in
one of the bitmap directories (see the <tt class="method">tix_addbitmapdir()</tt>
method).  By using <tt class="method">tix_getbitmap()</tt>, you can avoid hard
coding the pathnames of the bitmap files in your application. When
successful, it returns the complete pathname of the bitmap file,
prefixed with the character "<tt class="samp">@</tt>".  The returned value can be used to
configure the <code>bitmap</code> option of the Tk and Tix widgets.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4742' xml:id='l2h-4742' class="method">tix_addbitmapdir</tt></b>(</nobr></td>
  <td><var>directory</var>)</td></tr></table></dt>
<dd>
Tix maintains a list of directories under which the
<tt class="method">tix_getimage()</tt> and <tt class="method">tix_getbitmap()</tt> methods will
search for image files.  The standard bitmap directory is
<span class="file">$TIX_LIBRARY/bitmaps</span>. The <tt class="method">tix_addbitmapdir()</tt> method
adds <var>directory</var> into this list. By using this method, the image
files of an applications can also be located using the
<tt class="method">tix_getimage()</tt> or <tt class="method">tix_getbitmap()</tt> method.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4743' xml:id='l2h-4743' class="method">tix_filedialog</tt></b>(</nobr></td>
  <td><var></var><big>[</big><var>dlgclass</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Returns the file selection dialog that may be shared among different
calls from this application.  This method will create a file selection
dialog widget when it is called the first time. This dialog will be
returned by all subsequent calls to <tt class="method">tix_filedialog()</tt>.  An
optional dlgclass parameter can be passed as a string to specified
what type of file selection dialog widget is desired.  Possible
options are <code>tix</code>, <code>FileSelectDialog</code> or
<code>tixExFileSelectDialog</code>.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4744' xml:id='l2h-4744' class="method">tix_getimage</tt></b>(</nobr></td>
  <td><var>self, name</var>)</td></tr></table></dt>
<dd>
Locates an image file of the name <span class="file">name.xpm</span>, <span class="file">name.xbm</span> or
<span class="file">name.ppm</span> in one of the bitmap directories (see the
<tt class="method">tix_addbitmapdir()</tt> method above). If more than one file with
the same name (but different extensions) exist, then the image type is
chosen according to the depth of the X display: xbm images are chosen
on monochrome displays and color images are chosen on color
displays. By using <tt class="method">tix_getimage()</tt>, you can avoid hard coding
the pathnames of the image files in your application. When successful,
this method returns the name of the newly created image, which can be
used to configure the <code>image</code> option of the Tk and Tix widgets.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4745' xml:id='l2h-4745' class="method">tix_option_get</tt></b>(</nobr></td>
  <td><var>name</var>)</td></tr></table></dt>
<dd>
Gets the options maintained by the Tix scheme mechanism.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4746' xml:id='l2h-4746' class="method">tix_resetoptions</tt></b>(</nobr></td>
  <td><var>newScheme, newFontSet</var><big>[</big><var>,
                                     newScmPrio</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Resets the scheme and fontset of the Tix application to
<var>newScheme</var> and <var>newFontSet</var>, respectively.  This affects only
those widgets created after this call.  Therefore, it is best to call
the resetoptions method before the creation of any widgets in a Tix
application.

<p>
The optional parameter <var>newScmPrio</var> can be given to reset the
priority level of the Tk options set by the Tix schemes.

<p>
Because of the way Tk handles the X option database, after Tix has
been has imported and inited, it is not possible to reset the color
schemes and font sets using the <tt class="method">tix_config()</tt> method.
Instead, the <tt class="method">tix_resetoptions()</tt> method must be used.
</dl>

<p>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="20.2.2.8 form Geometry Manager"
  href="node712.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="20.2 tix  "
  href="module-Tix.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="20.3 scrolledtext  "
  href="module-ScrolledText.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="node712.html">20.2.2.8 Form Geometry Manager</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-Tix.html">20.2 Tix  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-ScrolledText.html">20.3 ScrolledText  </a>
</div>
</div>
<hr />
<span class="release-info">Release 2.5.1, documentation updated on 18th April, 2007.</span>
</div>
<!--End of Navigation Panel-->
<address>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</address>
</body>
</html>
